python="/usr/bin/python2.7"
origin_train_data="/home/lili/project/recommend/ll_newscms/public/data/lr/train.txt"
origin_test_data="/home/lili/project/recommend/ll_newscms/public/data/lr/test.txt"
train_data="/home/lili/project/recommend/ll_newscms/public/data/lr/train_file"
test_data="/home/lili/project/recommend/ll_newscms/public/data/lr/test_file"
lr_coef_file="/home/lili/project/recommend/ll_newscms/public/data/lr/lr_coef"
lr_model_file="/home/lili/project/recommend/ll_newscms/public/data/lr/lr_model"
feature_num_file="/home/lili/project/recommend/ll_newscms/public/data/lr/feature_num"


ana_train_data="/home/lili/project/recommend/pyrcd/personal_recommendation/LR/production/ana_train_data.py"
train="/home/lili/project/recommend/pyrcd/personal_recommendation/LR/production/train.py"
check="/home/lili/project/recommend/pyrcd/personal_recommendation/LR/production/check.py"



#if [ -f $origin_train_data -a -f $origin_test_data ]; then
if [ -f $origin_train_data  ]; then
#    $python $ana_train_data $origin_train_data $origin_test_data $train_data $test_data $feature_num_file
    $python $ana_train_data $origin_train_data  $train_data  $feature_num_file
else
    echo "no origin file"
    exit
fi
if [ -f $train_data  ]; then
    $python $train $train_data $lr_coef_file $lr_model_file $feature_num_file
else
    echo "no train file"
    exit
fi
#if [ -f $lr_coef_file -a -f $lr_model_file ]; then
#    $python $check $test_data $lr_coef_file $lr_model_file $feature_num_file
#else
#    echo "no model file"
#    exit
#fi